cfdbeacbd29ea5dfa8da4baa56067b8329c8955c,web/src/test/java/com/bazaarvoice/emodb/web/scanner/scheduling/ScanUploadSchedulingServiceTest.java,ScanUploadSchedulingServiceTest,testParticipationNotification,#DateTime#,263
Before Change
ScheduledExecutorService participationExecutorService = spy(Executors.newScheduledThreadPool(1));
Ticker ticker = mock(Ticker.class);
when(ticker.read()).thenReturn(TimeUnit.MILLISECONDS.toNanos(now.getMillis()));
// Start one hour in the future
String startTime = DateTimeFormat.forPattern("HH:mmZ").withZoneUTC().print(now.plusHours(1));
ScheduledDailyScanUpload upload = new ScheduledDailyScanUpload(
startTime, DateTimeFormat.longDateTime(), ScanDestination.discard(), DateTimeFormat.longDateTime(),
ImmutableList.of("catalog_global:cat"), 5, true);
ScanParticipationService service = new ScanParticipationService(
ImmutableList.of(upload), stashStateListener, lifecycle);
service.setScheduledExecutorService(participationExecutorService);
service.setTicker(ticker);
try {
service.start();
After Change
ScheduledExecutorService participationExecutorService = spy(Executors.newScheduledThreadPool(1));
Clock clock = Clock.fixed(Instant.ofEpochMilli(now.getMillis()), ZoneId.systemDefault());
// Start one hour in the future
String startTime = DateTimeFormat.forPattern("HH:mmZ").withZoneUTC().print(now.plusHours(1));